package org.training.gl.tdd.list;

public interface ICustomArrayList <Obj> {

	/**
	 * Returns <tt>true</tt> if this list contains the specified element,
	 * otherwise false.
	 * 
	 * @param o
	 *            element whose presence in this list is to be tested.
	 * @return <tt>true</tt> if this list contains the specified element.
	 */
	public boolean contains(Obj o);

	/**
	 * Returns the number of elements in this list.
	 * 
	 * @return the number of elements in this list.
	 */
	public int size();

	/**
	 * Appends the specified element to the end of this list.
	 * 
	 * @param o
	 *            element to be appended to this list.
	 * @return <tt>true</tt> .
	 */
	public void add(Obj o);

	/**
	 * Removes the first occurrence of the specified element in this list.
	 * 
	 * @param o
	 *            element to be removed from this list, if present.
	 * @return <tt>true</tt> if the list contained the specified element.
	 */
	public boolean remove(Obj o);

	/**
	 * Removes all of the elements from this list.
	 */
	public void clear();

	/**
	 * Returns the element at the specified position in this list.
	 * 
	 * @param index
	 *            index of element to return.
	 * @return the element at the specified position in this list.
	 * 
	 * @throws IndexOutOfBoundsException
	 *             if the specified index is out of range
	 */
	public Obj get(int index);

}
